export const goBack = (currentPages: Array<any>) => {
  const lastPagePath = currentPages[currentPages.length - 2].route
  if (lastPagePath.includes('switch-tab')) {
    uni.$uv.route({
      type: 'switchTab',
      url: lastPagePath,
    })
  } else {
    uni.$uv.route({
      type: 'navigateBack',
    })
  }
}
